package com.epam.qanda.db.model;

import java.io.File;
import java.io.Serializable;
import java.sql.Date;

import com.epam.qanda.db.annotaion.DBFieldName;

public class User implements Serializable {

	private static final long serialVersionUID = 1L;

	@DBFieldName("id")
	private Integer id;
	@DBFieldName("role_id")
	private Integer roleId;
	@DBFieldName("fname")
	private String fName;
	@DBFieldName("lname")
	private String lName;
	@DBFieldName("login")
	private String login;
	@DBFieldName("password")
	private String password;
	@DBFieldName("email")
	private String email;
	@DBFieldName("photo")
	private String photo = "resources" + File.separator + "images" + File.separator + "avatar"
			+ File.separator + "std_avatar.png";
	@DBFieldName("confirmation_status")
	private Boolean confirmationStatus = false;
	@DBFieldName("rating")
	private Integer rating = 0;
	@DBFieldName("status")
	private Boolean status = false;
	@DBFieldName("date_ban_off")
	private Date dateBanOff;
	@DBFieldName("hash")
	private String hash;
	
	
	public String getHash() {
		return hash;
	}

	public void setHash(String hash) {
		this.hash = hash;
	}

	public Date getDateBanOff() {
		return dateBanOff;
	}

	public void setDateBanOff(Date dateBanOff) {
		this.dateBanOff = dateBanOff;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getRoleId() {
		return roleId;
	}

	public void setRoleId(Integer roleId) {
		this.roleId = roleId;
	}

	public String getfName() {
		return fName;
	}

	public void setfName(String fName) {
		this.fName = fName;
	}

	public String getlName() {
		return lName;
	}

	public void setlName(String lName) {
		this.lName = lName;
	}

	public String getLogin() {
		return login;
	}

	public void setLogin(String login) {
		this.login = login;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPhoto() {
		return photo;
	}

	public void setPhoto(String photo) {
		this.photo = photo;
	}

	public boolean isConfirmationStatus() {
		boolean confirm;
		confirm = confirmationStatus;
		return confirm;
	}

	public void setConfirmationStatus(boolean confirmationStatus) {
		this.confirmationStatus = confirmationStatus;
	}

	public Integer getRating() {
		return rating;
	}

	public void setRating(Integer rating) {
		this.rating = rating;
	}

	public boolean isStatus() {
		return status;
	}

	public void setStatus(boolean status) {
		this.status = status;
	}

	@Override
	public String toString() {
		return "User [id=" + id + ", roleId=" + roleId + ", fName=" + fName + ", lName=" + lName
				+ ", login=" + login + ", password=" + password + ", email=" + email + ", photo="
				+ photo + ", confirmationStatus=" + confirmationStatus + ", rating=" + rating
				+ ", status=" + status + ", dateBanOff=" + dateBanOff + "]";
	}

}
